home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / docsm330.arc / DOCSMASH.DOC < prev    next >
Text File  |  1990-03-21  |  22KB  |  479 lines

  1.  
  2. DOCSMASH (TM) -- by David W. Rettger  
  3. ====================================  
  4.   
  5. DOCSMASH may be copied and passed to other users only if this  
  6. document file accompanies the executable program file and both  
  7. remain intact.  No party other than the author may change the  
  8. contents of these files or charge any fee for distribution (other 
  9. than a nominal sum to cover the cost of a floppy disk and mailing  
  10. fees).  
  11.   
  12. If you have benefitted from the use of DOCSMASH, please contribute
  13. toward to costs of creating and updating this program by sending  
  14. $10.00 (or $12.50 for a disk containing the latest version) to:  
  15.   
  16.        David Rettger  
  17.        5304 Johnson Avenue  
  18.        Western Springs, Il. 60558  
  19.   
  20. Updated versions are not attempts to get more money from registered  
  21. users.  They are my efforts to continue to improve this program.   
  22. After registering, please feel free to use future new versions free  
  23. of charge.  If you notice that the asking price has gone up and
  24. you feel that the additional enhancements are useful, send a  
  25. contribution for the increase only.  
  26.  
  27. IF YOU HAVE A QUESTION OR COMMENT ABOUT DOCSMASH, PLEASE INCLUDE
  28. THE VERSION NUMBER OF THE PROGRAM YOU ARE USING.  About 30 different
  29. versions have been released, each with additions or corrections based
  30. on user input.  Older versions are still floating around some BBS's. 
  31. The problem or improvement you wish to comment about may already be
  32. fixed.  
  33.  
  34. =====================================================================
  35.  
  36. DOCSMASH.EXE - Version 3.30
  37.  
  38.   
  39. Purpose:  
  40. --------  
  41.   
  42. On a graphics-capable printer, DOCSMASH reduces the size of normal 
  43. printed output by a factor of 4.  This means that a 200 page document
  44. will print out in 50 pages or less.  The type of hardware used
  45. determines the degree of compression that can be achieved.  (My nine
  46. pin printer will squeeze five full pages of text onto each sheet of
  47. paper.)
  48.  
  49. This program is intended to print only pure ASCII files.  BBS
  50. listings and most program manuals and documentation are usually pure
  51. ASCII files.  Document files created by word processors, however,
  52. generally contain a variety of soft codes, not pure ASCII.  Form feed
  53. codes are the only soft codes filtered out by DOCSMASH.  Other codes,
  54. if present, will play havoc with the final output from DOCSMASH.  To
  55. print a word processor file with DOCSMASH, resave the document in
  56. ASCII format with your word processor before using DOCSMASH.
  57.  
  58.  
  59. Operation:  The Opening Menu
  60. ----------  
  61.   
  62. DOCSMASH may be run from the current subdirectory or from the DOS  
  63. path.  At the DOS prompt, type the name "DOCSMASH" to begin.  The  
  64. opening menu will appear asking for the name of the document you  
  65. wish to print.  At this point you may:  
  66.   
  67.            - Type the name of a file to print.  
  68.            - Display a Help Menu  
  69.            - Change printer configuration.  
  70.            - Change screen colors.  
  71.            - Display a directory  
  72.            - Change subdirectory  
  73.            - End the DOCSMASH session.  
  74.   
  75. The other method of starting the program is to type DOCSMASH  
  76. followed by the path\name of the file to print.  No menu is   
  77. shown; instead, the print routine begins immediately.  (Ex: DOCSMASH
  78. DOCSMASH.DOC will cause the DOCSMASH.DOC file to be printed from the
  79. current subdirectory.)  
  80.  
  81. Throughout the program session, hitting the <Esc> key will either 
  82. erase any existing typed entry, or it will cause the program to back
  83. up to the previous menu.  On certain menus, any changes made will be
  84. ignored if you "escape" back to a previous menu.
  85.  
  86.  
  87. Printing a File: The Print Menu
  88. ----------------  
  89.   
  90. To print a file from the Opening Menu, type the name of the file
  91. followed by <ENTER>.  The Print Menu appears asking if you want to
  92. begin printing at the beginning, or in the middle, or if you wish to
  93. print something else instead.  To print the file from the beginning,
  94. just hit <ENTER>.  If your printer is on, it should begin printing
  95. four pages of text per sheet of paper.  If your first try at printing
  96. produces a strange looking output, you must change the control codes
  97. DOCSMASH sends to your printer.
  98.  
  99. You can start or re-start a print job from any specified point within
  100. the document file by pressing the space bar at the print menu.  At
  101. the prompt, type the phrase which identifies where you wish the
  102. printing to start.  DOCSMASH will search the file for that phrase and
  103. begin the printing on the line FOLLOWING the phrase.  Note:  The
  104. search feature is case sensitive.  Type the phrase exactly as you
  105. expect it to appear in the document.
  106.  
  107. The default setting is for continuous printing.  However, the <F3>
  108. key acts  as a toggle switch whenever the "Page Break Pause" status
  109. box is visible on the screen.  When the Page Break Pause is ON, the
  110. printer will pause between page breaks.  This enables users to feed
  111. individual sheets of paper into their printers.  This also allows
  112. double sided printing to be done, thereby printing eight pages of the
  113. document text on one sheet of 8.5 x 11 inch paper.  Just think of the
  114. compression factor available here!  On wide computer paper you can
  115. get at least six pages of text per side.  That means at least 12
  116. pages of print per sheet of paper.  (OK, so who uses wide paper?  You
  117. probably will have to settle for eight pages of text per sheet of
  118. paper.)
  119.  
  120. If the document to be printed is page formatted with form feed codes,
  121. you may choose to suppress the form feeds or have the program use the
  122. codes to format each smashed page.  The <F4> key will toggle between
  123. the two choices.  Maximum compression will occur if you suppress the
  124. author's pagination.  Suppression is the default setting.  If you
  125. definitly want to keep the original page format, select the no-
  126. suppression setting.  NOTE: Be sure to set the number of lines per
  127. page (on the Page Format Menu described below) to a value at least as
  128. large as the authors pages used in the document.  Also, this option
  129. assumes that the document is being printed as the author wrote it. 
  130. Over-long text lines containing form feeds will not wrap correctly.  
  131.  
  132.  
  133. Display the Help Menu:  
  134. ----------------------  
  135.   
  136. Hit the <F1> key to bring up a simple help menu.  It displays the  
  137. special phrases and keystrokes that DOCSMASH is looking for at this  
  138. point in the program.  Hit any key to resume.  (Note: The help menu  
  139. will not function on certain monochrome systems.  If your system  
  140. is not compatible, you will see a notice when you start DOCSMASH  
  141. that indicates that the <F1> key has been disabled.)  
  142.   
  143.   
  144. The DOCSMASH Page Layout:  
  145. ------------------------  
  146.   
  147. The basic DOCSMASH page layout is a single 8.5 x 11 inch sheet of
  148. paper divided into four quadrants.  The program compresses one page
  149. of normal text into each of the four quadrants.  This four quadrant
  150. format may be thought of as two vertical columns, each of which is
  151. split into two units.  However, the user may change this basic four
  152. quadrant format.  DOCSMASH allows the user to select both the number
  153. of columns to be printed on a page and the number of units each
  154. column is to be split into.  The user may also select the number of
  155. lines to pe printed per inch and the number of lines to be printed in
  156. each unit.
  157.  
  158. If the default settings for the page layout are not satisfactory, the
  159. user may change them from the "Parameter Control Menu."
  160.  
  161.  
  162. Changing the Page Layout:  The Parameter Control Menu
  163. -------------------------
  164.  
  165. Changing the printer settings is easy if you have an Epson  
  166. compatible printer.  At the opening menu, instead of typing a
  167. document name, type RESET PARAMS (or just hit <ENTER>).  The
  168. Parameter Control Menu will appear showing the current settings. 
  169. These settings and their preset defaults are:  
  170.   
  171.             Page Format Settings:  
  172.   
  173.             Print Width Setting        = 164  
  174.             Number of Columns to Print = 2  
  175.             Number of Pages Per Column = 2  
  176.             Lines Per Page Printed     = 58  
  177.             Max Blank Lines to Print   = 4  
  178.             Word Wrap Is Now           = ON
  179.   
  180.             Epson Printer Control Settings:  
  181.   
  182.             N/216th's Inch Line Feed   = 17  
  183.             Paper Length in Inches     = 11  
  184.             Left Margin Column Setting = 0  
  185.   
  186.   
  187. The first group labeled "Page Format Settings" determines the layout
  188. of the page DOCSMASH will print.  These settings do not affect the
  189. control codes actually sent to the printer.
  190.  
  191. The "Printer Width Setting" is the total number of characters that
  192. will be printed across the entire page. A print width setting of 164,
  193. with 2 print columns specified will result in two 80-width columns
  194. separated by 4 spaces.  
  195.  
  196. Each column of print can be split into multiple pages.  A setting of
  197. 2 for "Pages Per Column" results in the four quadrant format DOCSMASH
  198. was initially designed around.  Set this value to one and you will
  199. achieve the most compression.  
  200.  
  201. "Lines Printed Per Page" refers to the individual pages in each  
  202. column.  If a single column would be filled using a setting of 124,  
  203. then a column broken into two pages obviously would need 62 lines  
  204. per page.  
  205.  
  206. To maximize compression, DOCSMASH tries to throw out excess "white
  207. space", i.e. blank lines of text.  The default setting will allow up
  208. to four consecutive blank lines.  Conceivably, a zero setting can be
  209. used, but the final output with no white space would be hard to read. 
  210. A setting of, say, 80 would most likely result in the text coming
  211. through just as the author had typed it.  
  212.  
  213. All early versions assumed that maximum compression was the ultimate
  214. goal.  In the event a text line exceeded the column print width, word
  215. wrap caused the excess length to drop down a line.  The next line was
  216. read from the file and added on the same print line until the end of
  217. the column was reached, at which point it too dropped down a line. 
  218. The net effect sometimes was to entirely reformat the paragraph.
  219.  
  220. Versions 3.2 and higher now include user controlled word wrap.  Word
  221. Wrap is now a four position "toggle switch".  The options are ON,
  222. OFF, AUTO-INDENT, and TRUNCATE.  The default position is ON, which
  223. enables the method described above.  Selecting OFF causes excess line
  224. length to be placed left-margin justified on the next line.  The next
  225. read text line will print on the next line.  If the excess line
  226. length happens to be a single word, that word will appear alone on
  227. its own line. 
  228.  
  229. The AUTO-INDENT feature was designed with programmers in mind.  Much
  230. source code is formatted with specific indentations from the left
  231. margin to mark blocks of codes such as loops and subroutines.  With
  232. this setting excess line length will drop to the next line, but is
  233. not left justified.  If the line it comes from begins in the tenth
  234. column, the excess print will also begin in the tenth column.  No
  235. further reformatting will be done.  
  236.  
  237. ON, AUTO-INDENT and OFF modes will attempt to break lines between
  238. words.
  239.  
  240. The TRUNCATE mode does just what it says.  If excess line length
  241. occurs,  it disappears from the print out.  I can not guess who would
  242. want such an option, but I am sure that if it were not included I
  243. would get all kinds of correspondence asking for it!
  244.   
  245. The second group of settings refers to the EPSON control codes sent  
  246. to the printer to achieve the "mini" print size.  The line feed  
  247. setting of 17 sets line feeds to 17/216's of an inch.  The closer the
  248. lines are, the more you can fit on a page.  Change this setting
  249. according to your own needs.
  250.  
  251. The "Paper Length in Inches" setting should match the size paper you
  252. want to use.  
  253.  
  254. The "Left Margin Column" setting can be adjusted in the event you 
  255. position your paper specially for certain word processors or if you
  256. just want to punch holes in the left side of the page.  On narrow
  257. carriage printers, a wider left margin will eat into the width that
  258. is available for printing text.    
  259.   
  260. To make these changes effective, they must be saved.  Exiting this
  261. menu by hitting the space bar will save them.  If you wish to exit
  262. with no save, hit the <Esc> key.  If you do save the changes, they
  263. are saved in a configuration file, DOCSMASH.CFG.
  264.  
  265. The DOCSMASH.CFG File:
  266. ----------------------
  267.  
  268. Whenever you run DOCSMASH, it looks for the DOCSMASH.CFG file in the
  269. root directory of the logged drive.  If it does not find the file,
  270. DOCSMASH creates it, using the default parameter settings contained
  271. in the program.  Future changes from the Parameter Menu will be saved
  272. and recalled from this file.  To get back to the defaults, simply
  273. delete the .CFG file.
  274.  
  275. Using Enviornment Variables with DOCMSASH:
  276. ------------------------------------------
  277.  
  278. A feature added to versions 3.27 and higher permits users to select
  279. where DOCSMASH will find the .CFG and .PRN (described later) files. 
  280. If you do not want these files to be put in your root directory, use
  281. the DOS command SET.  To tell DOCSMASH to find the files in a
  282. subdirectory called "DOCSMASH" on the C: drive, you would type 
  283. "SET DOCSMASH=C:\DOCSMASH\" at the DOS prompt or include that line in
  284. the AUTOEXEC.BAT file.  If the files do not exist in the specified
  285. subdirectory, they will be created there.
  286.  
  287.  
  288. The Print control Codes:
  289. ------------------------
  290.   
  291. As stated earlier, the Page Format Settings control how DOCSMASH lays
  292. out a page to be printed.  These values are not printer control
  293. codes.  The program sends the following default set of print control
  294. codes to the printer if it does not find the print control file,
  295. DOCSMASH.PRN, in the root directory of the logged drive.
  296.  
  297.     Code Name            Code Symbol       ASCII Representation  
  298.     ---------            -----------       --------------------   
  299.     Printer Reset         Esc @            27,64  
  300.     Elite Mode            Esc M            27,77   
  301.     Condensed Mode        Shift In         15  
  302.     Subscript Mode        Esc S 0          27,83,0  
  303.     Line Feed Width       Esc 3 n          27,51,n  *  
  304.     Left Margin           Esc l n          27,108,n  *  
  305.     Paper Length          Esc C Null n     27,67,0,n  *  
  306.   
  307.           *  "n" is a variable set by the user
  308.              under the Parameter Control Menu.   
  309.   
  310. This combination, sent in this order, is the method used to create  
  311. the small print.  The codes sent are Epson codes and will not work  
  312. on Toshiba and other printers.  Also, some Epson type printers will
  313. not accept both condensed and elite modes.  If your hardware will not 
  314. go into a "mini" print mode with the above settings, you must create 
  315. your own set of printer control codes.  
  316.   
  317. Another set of printers which is not entirely compatible with these  
  318. commands are 24 pin printers.  They tend to run over to the next  
  319. page with my default settings.  The NEC P2200, for instance, does  
  320. not use the 216th's inch line feed mode.  It should be set up in  
  321. its 360th's of an inch mode as if it were a not-Epson compatible  
  322. printer.  
  323.   
  324.   
  325. Printers Not Epson Compatible: The Print Control Menu
  326. ------------------------------  
  327.   
  328. If you use a printer which is not Epson compatible (such  
  329. as Toshiba or Hewlett-Packard printers), or even some Epson  
  330. compatibles that happen to require slightly different codes, you  
  331. must customize the codes DOCSMASH will send to the printer. To do
  332. this, type RESET PRINTER (or hit F5) when prompted for a document
  333. name at the opening menu.  The list of codes currently in use will
  334. appear.  The top item will be highlighted.  Use the cursor control
  335. keys to move the highlighted bar.  The left column is a list of the
  336. codes by name. The right column is each code represented in decimal
  337. ASCII format.  
  338.   
  339. You may change the order the codes appear in to suit your needs.
  340. However, the code for Reset Printer must be the first code in the
  341. list.  The lines labeled "Extra" are just that, extra. They are
  342. merely place holders to show where room exists for users to enter
  343. additional lines of code.  If left blank, a null is sent to the
  344. printer.
  345.  
  346. Changing the Print Control Codes:
  347. ---------------------------------
  348.  
  349. Changing the print control codes is easy.  To change a code label in
  350. the left-hand column, go to the appropriate row and type the label
  351. you want.  When you hit ENTER or move the bar, your new label will  
  352. appear in the left column.  To change the code values, simply type  
  353. the needed ASCII codes, separating each number with a comma.  
  354.  
  355. Note: You MUST use the commas to delimit ASCII numbers and do not
  356. type any spaces!  Labels must begin with non-numeric characters.  
  357.  
  358. To entirely delete an entry, type a space.  Typing mistakes are
  359. corrected by backspacing.  Backspacing over an entire new entry will
  360. restore the original values.  
  361.   
  362. After making any changes, hit <F10> to return to the main menu.  
  363. You will have the option of saving the changes.  If they are not
  364. saved, the changes will remain in memory only for the current
  365. DOCSMASH session, or until you go to the RESET PARAMS menu.  If
  366. saved, a file called DOCSMASH.PRN will be created on the root
  367. directory of the logged drive.  As long as the .PRN file exists,
  368. DOCSMASH will use only those printer codes in the file, not the
  369. printer codes from the RESET PARAMS menu.  To use the codes in RESET
  370. PARAMS, delete the .PRN file.  This is easily accomplished from
  371. within DOCSMASH by typing the phrase "KILL PRN FILE" instead of a
  372. document name.   
  373.   
  374. NOTE: The .PRN files created by earlier versions of DOCSMASH are  
  375. not compatible with the new versions, 3.1 and higher.  Delete the  
  376. old \DOCSMASH.PRN file before using the new version.    
  377.   
  378. Programming printer codes can be an imposing problem to non-  
  379. programmers.  A few users have taken the time to upload files  
  380. containing custom printer codes for their printers to the Orchard  
  381. Hill BBS (see below).  One such file is for the HP Laser Jet II.   
  382. If you get your printer set up properly, feel free to send to me a  
  383. copy of your custom codes along with your registration fee.  If  
  384. yours is the first I receive for your type printer, I will upload  
  385. the information in a file giving you credit for the contribution.  
  386.   
  387.   
  388. Changing Screen Colors:  
  389. -----------------------  
  390.   
  391. At any time, hit <F2> to change screen colors.  A color selection
  392. menu will appear that shows the possible screen colors and their
  393. corresponding numbers.  Enter a number for the foreground (text)
  394. color and the background color.  My preference is white (15) text and
  395. blue (1) background.  Monochrome monitor users should use a dark
  396. background color (0).  
  397.   
  398.   
  399. Displaying a Directory:  
  400. -----------------------  
  401.   
  402. You can obtain a directory listing by entering the DOS command "DIR"
  403. instead of a document name at the opening menu.  You may specify any
  404. valid drive or path after the "DIR" command.  This function no longer
  405. uses the DOS "SHELL" command so it should work on pre-DOS 3.0
  406. systems.
  407.  
  408.   
  409. Changing Directories:  
  410. ------------------------  
  411. When asked for a document name at the opening menu, use the DOS
  412. command "CD\", followed by any valid path name, to change to a new
  413. subdirectory. Changing physical drives is not supported.  Printing a
  414. document on a drive other than the logged drive may be done simply by
  415. typing the entire file name, including the drive designation.  
  416.   
  417.   
  418. Terminating DOCSMASH:  
  419. ---------------------  
  420.   
  421. At almost any time you may hit <F10> to terminate.  If it does not  
  422. kick right out, hit <Enter>.  Apparently there are a few machines  
  423. out there that will not kick out with this command, so you also can  
  424. type the word END, instead of a document name, to quit.  
  425.   
  426.  
  427. Error Codes:  
  428. ------------  
  429.   
  430. In the event that DOCSMASH encounters a problem, error codes will be
  431. shown on the screen.  The manual for IBM's BASICA or for GWBASIC
  432. lists such error codes.  You can do a certain amount of trouble
  433. shooting for yourself by looking up the number of the error code.    
  434.  
  435.  
  436. Other changes from early versions are:  
  437.   
  438. - No truncating of print that is too wide for a single line.  Long  
  439. lines will wrap to the next line.  One user decided he did not like  
  440. word wrap, that he preferred truncating a few letters.  Well, you  
  441. can't please everybody!  
  442.   
  443. - Progress reports during printing.  As pages spool to the printer,  
  444. you will see the percent of the file read reported on the screen.   
  445. Large print buffers will result in the reported number to be far  
  446. ahead of the actual printed output.  
  447.   
  448.   
  449. One final note, I have tried to make DOCSMASH as general as  
  450. possible.  With all the different hardware in use these days, it  
  451. is difficult to create a printer program that will run with  
  452. everything.  If you find that your equipment does not function  
  453. properly with this program, feel free to send a sample of the  
  454. program's output to me at the address shown above.  Please include  
  455. your name and address AND THE VERSION NUMBER of the program you are  
  456. using.  If you are using your own printer codes, send that  
  457. information, too.    
  458.   
  459.   
  460. =================================================================  
  461. This particular version of DOCSMASH was compiled using MicroSoft's
  462. QuickBasic (Ver 4.5).  
  463. =================================================================  
  464. My thanks to Douglas K. Jardine, freelance writer/editor who
  465. contributed his writing talants, reworking the bulk of the
  466. DOCSMASH.DOC file.  
  467. =================================================================
  468.   
  469. All the changes made to DOCSMASH since its debut have been the  
  470. result of comments sent to the author by users.  If you would like  
  471. to see something changed or added, or if you just wish to make a  
  472. comment about the program, you may leave a message for David  
  473. Rettger on the ORCHARD HILL BBS, (708) 361-4547. Orchard Hill has
  474. DOCSMASH available to non-registered callers. Call here for latest
  475. versions.  Also, if you are interested in an active BBS with a
  476. service oriented SYSOP, do consider this one!    
  477.   
  478. On Compuserve, leave a message to the author, 71131,3253.
  479.